package com.rgs.ssm.service.impl;

import com.github.pagehelper.PageHelper;
import com.rgs.ssm.dao.IMemberDao;
import com.rgs.ssm.domain.Member;
import com.rgs.ssm.service.IMemberService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @create 2021-02-15 16:51
 **/

@Service
@Transactional
public class MemberService implements IMemberService {

    @Autowired
    private IMemberDao memberDao;


    @Override
    public void saveMember(Member member) {

    }

    @Override
    public void delete(Integer id) {

    }

    @Override
    public void update(Member member) {

    }

    @Override
    public List<Member> findAll(int page,int size){
        PageHelper.startPage(page,size);
        return memberDao.findAll();
    }

    @Override
    public List<Member> findAll(){
        return memberDao.findAll();
    }

    @Override
    public Member findById(Integer id) {
        return memberDao.findById(id);
    }

}
